package com.zhiche.lisa.tms.dto;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 司机
 * </p>
 *
 * @author qichao
 * @since 2018-06-27
 */
@TableName("lisa_driver")
public class Driver extends Model<Driver> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 真实姓名
     */
	private String name;
    /**
     * 手机号
     */
	private String mobile;
    /**
     * 出生日期
     */
	private Date dob;
    /**
     * 驾龄
     */
	private Integer yod;
    /**
     * 性别；0-女；1-男
     */
	private Integer sex;
    /**
     * 服务类型（多个用分号隔开）
     */
	@TableField("service_type")
	private String serviceType;
    /**
     * 微信的open_id
     */
	@TableField("open_id")
	private String openId;
    /**
     * 登录账号
     */
	@TableField("account_id")
	private Long accountId;
    /**
     * 所属承运商
     */
	@TableField("lsp_id")
	private Long lspId;
    /**
     * 所属车队
     */
	@TableField("fleet_id")
	@JsonSerialize(using=ToStringSerializer.class)
	private Long fleetId;
    /**
     * 驾照类型（多个用分号隔开）
     */
	@TableField("driving_license_type")
	private String drivingLicenseType;
    /**
     * 业务状态:0-停用;1-启用
     */
	private Integer status;
    /**
     * 认证状态:0-未认证;1-已认证
     */
	@TableField("auth_status")
	private Integer authStatus;
    /**
     * 注册人
     */
	private String creator;
    /**
     * 注册时间
     */
	@TableField("gmt_create")
	private Date gmtCreate;
    /**
     * 数据来源
     */
	@TableField("create_from")
	private String createFrom;
	@TableField("gmt_update")
	private Date gmtUpdate;
    /**
     * 业务覆盖城市。多个用分号分割
     */
	@TableField("business_site")
	private String businessSite;
    /**
     * 租户ID
     */
	@TableField("tenant_id")
	private Long tenantId;

	@TableField("is_delete")
	@TableLogic
	private Integer isDelete;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Date getDob() {
		return dob;
	}

	public void setDob(Date dob) {
		this.dob = dob;
	}

	public Integer getYod() {
		return yod;
	}

	public void setYod(Integer yod) {
		this.yod = yod;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public String getServiceType() {
		return serviceType;
	}

	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public Long getAccountId() {
		return accountId;
	}

	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}

	public Long getLspId() {
		return lspId;
	}

	public void setLspId(Long lspId) {
		this.lspId = lspId;
	}

	public Long getFleetId() {
		return fleetId;
	}

	public void setFleetId(Long fleetId) {
		this.fleetId = fleetId;
	}

	public String getDrivingLicenseType() {
		return drivingLicenseType;
	}

	public void setDrivingLicenseType(String drivingLicenseType) {
		this.drivingLicenseType = drivingLicenseType;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getAuthStatus() {
		return authStatus;
	}

	public void setAuthStatus(Integer authStatus) {
		this.authStatus = authStatus;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public String getCreateFrom() {
		return createFrom;
	}

	public void setCreateFrom(String createFrom) {
		this.createFrom = createFrom;
	}

	public Date getGmtUpdate() {
		return gmtUpdate;
	}

	public void setGmtUpdate(Date gmtUpdate) {
		this.gmtUpdate = gmtUpdate;
	}

	public String getBusinessSite() {
		return businessSite;
	}

	public void setBusinessSite(String businessSite) {
		this.businessSite = businessSite;
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Driver{" +
			", id=" + id +
			", name=" + name +
			", mobile=" + mobile +
			", dob=" + dob +
			", yod=" + yod +
			", sex=" + sex +
			", serviceType=" + serviceType +
			", openId=" + openId +
			", accountId=" + accountId +
			", lspId=" + lspId +
			", fleetId=" + fleetId +
			", drivingLicenseType=" + drivingLicenseType +
			", status=" + status +
			", authStatus=" + authStatus +
			", creator=" + creator +
			", gmtCreate=" + gmtCreate +
			", createFrom=" + createFrom +
			", gmtUpdate=" + gmtUpdate +
			", businessSite=" + businessSite +
			", tenantId=" + tenantId +
			"}";
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}
}
